﻿@using Microsoft.AspNetCore.Mvc.Razor
@model ProductAttributeModel

<vc:admin-widget widget-zone="product_attribute_details_info_top" additional-data="Model"/>

@{
    Func<int, HelperResult>
        template = @<div class="form-body">
                       <div class="form-group">
                           <admin-label asp-for="@Model.Locales[item].Name"/>
                           <div class="col-md-9 col-sm-9">
                               <admin-input asp-for="@Model.Locales[item].Name"/>
                               <span asp-validation-for="@Model.Locales[item].Name"></span>
                           </div>
                       </div>
                       <div class="form-group">
                           <admin-label asp-for="@Model.Locales[item].Description"/>
                           <div class="col-md-9 col-sm-9">
                               <admin-input asp-for="@Model.Locales[item].Description" asp-template="Editor"/>
                               <span asp-validation-for="@Model.Locales[item].Description"></span>
                           </div>
                       </div>
                       <input asp-for="@Model.Locales[item].LanguageId" type="hidden"/>
                   </div>;
}

<div class="form-horizontal">
    <localized-editor localized-template="@template" name="productattribute-localized" language-ids="@Model.Locales.Select(c => c.LanguageId).ToList()">
        <div class="form-body">
            <div class="form-group">
                <admin-label asp-for="Name"/>
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="Name"/>
                    <span asp-validation-for="Name"></span>
                </div>
            </div>
            <div class="form-group">
                <admin-label asp-for="Description"/>
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="Description" asp-template="Editor"/>
                    <span asp-validation-for="Description"></span>
                </div>
            </div>
        </div>
    </localized-editor>
    <div class="form-group">
        <admin-label asp-for="Stores"/>
        <div class="col-md-9 col-sm-9">
            <admin-input asp-for="Stores"/>
            <span asp-validation-for="Stores"></span>
        </div>
    </div>
    <div class="form-body">
        <div class="form-group">
            <admin-label asp-for="SeName"/>
            <div class="col-md-9 col-sm-9">
                <admin-input asp-for="SeName"/>
                <span asp-validation-for="SeName"></span>
            </div>
        </div>
    </div>
</div>
<vc:admin-widget widget-zone="product_attribute_details_info_bottom" additional-data="Model"/>